// mockService.js
import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
const mock = new MockAdapter(axios, { delayResponse: 500 });

// Mocking URLs
const mockData = {
  'https://api.example.com/data1': { data: 'data111' },
  'https://api.example.com/data2': { data: 'data222' },
  'https://api.example.com/data3': { data: 'data333' },
  'https://api.example.com/data4': { data: 'data444' },
  'https://api.example.com/data5': { data: 'data555' },
  'https://api.example.com/data6': { data: 'data666' },
  'https://api.example.com/data7': { data: 'data777' },
  'https://api.example.com/data8': { data: { permissions: ['system:add', 'system:read', 'system:del'] } }

  // Add more mock URLs and their responses here
};

Object.keys(mockData).forEach(url => {
  mock.onGet(url).reply(200, mockData[url]);
});

export default axios;
